package com.csw.tableJqgrid.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csw.tableJqgrid.dao.DeptDao;
import com.csw.tableJqgrid.entity.Dept;

/**
 * @author 1
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DeptServiceImpl implements DeptService {
	@Autowired
	private DeptDao deptDao;

	@Override
	public List<Dept> queryAll() {
		return deptDao.queryAll();
	}

	@Override
	public void delete(String deptid) {
		deptDao.deleteById(deptid);
	}

	@Override
	public Dept queryById(String deptid) {
		return deptDao.queryById(deptid);
	}

	@Override
	public void update(Dept dept) {
		deptDao.update(dept);
	}

	@Override
	public void add(Dept dept) {
		deptDao.add(dept);
	}
}
